﻿// DataAccess/OpenAiContent.cs
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace StrategyReportViewer.DataAccess;

// 使用 PrimaryKey 特性定义复合主键
[PrimaryKey(nameof(Date), nameof(Pzdm))]
[Table("openai_content")] // 显式指定表名
public class OpenAiContent
{
    [Column("date", TypeName = "varchar(10)")]
    public required string Date { get; set; }

    [Column("pzdm", TypeName = "varchar(10)")]
    public required string Pzdm { get; set; }

    [Column("name", TypeName = "varchar(10)")]
    public string? Name { get; set; }

    [Column("content", TypeName = "longtext")]
    public string? Content { get; set; }
}